package cn.neusoft.exception;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@NoArgsConstructor
@ToString
public class AppException extends RuntimeException {
    private Integer code=500;
    private String message="服务器内部出错";
    AppException(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public AppException(AppExceptionCodeMsg codeMsg) {
        this.code=codeMsg.getCode();
        this.message=codeMsg.getMsg();
    }

}
